package com.itheima.pojo;

import java.io.Serializable;
import java.math.BigDecimal;

public class CheckItem implements Serializable {
    private Integer id;//主键
    private String code;//项目编码
    private String name;//项目名称
    private Integer sex;//适用性别
    private String age;//适用年龄（范围），例如：20-50
    private BigDecimal price;//价格   10.22
    private Integer type;//检查项类型，分为检查和检验两种类型
    private String remark;//项目说明
    private String attention;//注意事项
    private Integer status;//状态

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAttention() {
        return attention;
    }

    public void setAttention(String attention) {
        this.attention = attention;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CheckItem checkItem = (CheckItem) o;

        if (id != null ? !id.equals(checkItem.id) : checkItem.id != null) return false;
        if (code != null ? !code.equals(checkItem.code) : checkItem.code != null) return false;
        if (name != null ? !name.equals(checkItem.name) : checkItem.name != null) return false;
        if (sex != null ? !sex.equals(checkItem.sex) : checkItem.sex != null) return false;
        if (age != null ? !age.equals(checkItem.age) : checkItem.age != null) return false;
        if (price != null ? !(price.compareTo(checkItem.price) ==0) : checkItem.price != null) return false;
        if (type != null ? !type.equals(checkItem.type) : checkItem.type != null) return false;
        if (remark != null ? !remark.equals(checkItem.remark) : checkItem.remark != null) return false;
        return attention != null ? attention.equals(checkItem.attention) : checkItem.attention == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (age != null ? age.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (attention != null ? attention.hashCode() : 0);
        return result;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "{" +
                "id=" + id +
                ", code=" + code +
                ", name=" + name +
                ", sex=" + sex +
                ", age=" + age +
                ", price=" + price +
                ", type=" + type +
                ", remark=" + remark +
                ", attention=" + attention +
                ", status=" + status +
                '}';
    }
}
